<!DOCTYPE html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title>欢迎页面-X-admin2.1</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="../../css/font.css">
        <link rel="stylesheet" href="../../css/xadmin.css">
        <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
        <script type="text/javascript" src="../../lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="../../js/xadmin.js"></script>
        <script type="text/javascript" src="../../js/cookie.js"></script>
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--&lt;!&ndash;[if lt IE 9]>-->
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        </head>
        <body>

        <div class="x-body">
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>运单详情</legend>
            </fieldset>
            <fieldset class="layui-elem-field">
                <legend>订单信息</legend>
                <div class="layui-field-box">
                    <table class="layui-hide" id="ddM"></table>
                </div>
            </fieldset>

            <fieldset class="layui-elem-field">
                <legend>物流信息</legend>
                <div class="layui-field-box">
                    <!--<li>-->
                        <!--<div>等待配送</div>-->
                        <!--<div class="cc">操作员:李敏 工号:KF001</div>-->
                        <!--<div class="cc">2016-12-28 11:18:07</div>-->
                    <!--</li>-->
                    <!--<br>-->
                    <!--<li>-->
                        <!--<div>开始配送</div>-->
                        <!--<div class="cc">操作员:李敏 工号:KF001</div>-->
                        <!--<div class="cc">2016-12-28 11:18:07</div>-->
                    <!--</li>-->
                    <!--<br>-->
                    <!--<li>-->
                        <!--<div style="color: red">其他配送失败情况</div>-->
                        <!--<div class="cc">操作员:李敏 工号:KF001</div>-->
                        <!--<div class="cc">2016-12-28 11:18:07</div>-->
                    <!--</li>-->
                    <!--<br>-->
                    <!--<li>-->
                        <!--<div>派送点已收到退货</div>-->
                        <!--<div class="cc">操作员:李敏 工号:KF001</div>-->
                        <!--<div class="cc">2016-12-28 11:18:07</div>-->
                    <!--</li>-->
                    <table class="layui-hide" id="wlM" lay-even lay-skin="nob"></table>
                </div>
            </fieldset>

            <fieldset class="layui-elem-field">
                <legend>货物信息</legend>
                <div class="layui-field-box">
                    <table class="layui-hide" id="hwM"></table>
                </div>
            </fieldset>

            <fieldset class="layui-elem-field">
                <legend>配送人信息</legend>
                <div class="layui-field-box">
                    <table class="layui-hide" id="psrM"></table>
                </div>
            </fieldset>

            <fieldset class="layui-elem-field">
                <legend>收货人信息</legend>
                <div class="layui-field-box">
                    <table class="layui-hide" id="shrM"></table>
                </div>
            </fieldset>
        </div>
        <!--订单信息-->
    <script>
        layui.use('table', function(){
            var table = layui.table;
            table.render({
                elem: '#ddM'
                ,url:'/servletXq?func=xq'
                ,cols: [[
                    {field:'sys_no', width:150, title: '系统订单号'}
                    ,{field:'goods_no', width:150, title: '货物订单号'}
                    ,{field:'status', width:110, title: '运单状态'}
                    ,{field:'created_date', width:150, title: '下单时间'}
                    ,{field:'area',width:80, title: '仓储区域'}
                    ,{field:'text', width:200, title: '备注'}
                ]]
            });
        });
    </script>

    <!--货物信息-->
    <script>
        layui.use('table', function(){
            var table = layui.table;
            table.render({
                elem: '#hwM'
                ,url:'/servletXq?func=success'
                ,cols: [[
                    {field:'category_name', width:150, title: '分类'}
                    ,{field:'goods_name', width:150, title: '货品'}
                    ,{field:'goods_num', width:110, title: '数量'}
                ]]
            });
        });
    </script>

    <!--配送人信息-->
    <script>
        layui.use('table', function(){
            var table = layui.table;
            table.render({
                elem: '#psrM'
                ,url:'/servletXq?func=xq'
                ,cols: [[
                    {field:'s_name', width:150, title: '姓名'}
                    ,{field:'s_tel', width:150, title: '电话'}
                ]]
            });
        });
    </script>

    <!--收货人信息-->
    <script>
        layui.use('table', function(){
            var table = layui.table;
            table.render({
                elem: '#shrM'
                ,url:'/servletXq?func=xq'
                ,cols: [[
                    {field:'name', width:150, title: '姓名'}
                    ,{field:'tel', width:150, title: '电话'}
                    ,{field:'consignee_address', width:110, title: '地址'}
                ]]
            });
        });
    </script>
        <!--物流信息-->
        <script>
            layui.use('table', function () {
                var table = layui.table;
                table.render({
                    elem: '#wlM'
                    , url: '/servletXq?func=wl'
                    , cols: [[
                        {
                            field: 'status_number', width: 80, title: '订单状态',
                            templet: function (item) {
                                var s = item.status_number;
                                if (s == 0) {
                                    return "开始配送";
                                } else if (s == 1) {
                                    return "中转";
                                } else if (s == 2) {
                                    return "签收";
                                } else if (s == 3) {
                                    return "寄存签收";
                                } else if (s == 4) {
                                    return "拒收";
                                } else if (s == 5) {
                                    return "收到退货";
                                }
                                return null;
                            }
                        }
                        , {field: 's_name', width: 100, title: '操作员'}
                        , {field: 'job_number', width: 100, title: '工号'}
                        , {field: 'last_date', width: 200, title: '时间'}
                    ]]
                });
            });
        </script>

        <!--<script>-->
        <!--var _hmt = _hmt || [];-->
        <!--(function() {-->
            <!--var hm = document.createElement("script");-->
            <!--hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";-->
            <!--var s = document.getElementsByTagName("script")[0];-->
            <!--s.parentNode.insertBefore(hm, s);-->
        <!--})();-->
    <!--</script>-->

    </body>
</html>